package com.hongyi.app.controller;

import com.hongyi.app.mapper.UserMapper;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.jmx.export.assembler.MethodNameBasedMBeanInfoAssembler;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author HongYi
 */
@Slf4j
@Controller
public class IndexController {

    /**
     *转发到首页
     * 该方法必须通过GET请求访问，其他请求访问时报错
     * cli:http://localhost:8080/index
     * cli:http://localhost:8080/home
     * cli:http://localhost:8080/index.html
     * @return 跳转页面
     */
    @RequestMapping(value = {"/home","/index"},method = RequestMethod.GET)
    public String index(){
        log.info("转发到项目首页");
        return "index";
    }

}
